1. Field of the Invention
The invention relates to a rendering method and a rendering apparatus, and more particularly, relates to a method and an apparatus for rendering overlapped objects.
2. Description of Related Art
As computer technology advances rapidly, computer has become one of the most important electronic devices daily used by people nowadays. With the rapid development in software technology, in addition to the speed and functionality, there is also an increasing emphasis on picture quality of the computer. To attract more attention from users, software manufacturers have to provide eye-feasting operating environment for users by producing a more delicate operating interface, other than just developing more innovative functionalities.
In conventional art, operating interface of operating system is displayed right after computer is powered on and entered to operating system. Users may set up a style of desktop and select applications to execute their desired functions via said operating interface. Generally, the selected applications are displayed as windows on the desktop which allows users to switch between applications by clicking on different windows.
While multiple windows are opened by users, due to limitation of display area on a screen of the computer, all windows are overlapped to each other in order to fit into the display area of the screen. The windows are displayed in a layer-by-layer manner on the screen according to a sequence of the windows being opened or used by the users, in which a current window (the one most recently used) is displayed on top of the other windows, which overlaps the other windows. In this case, contents of the overlapped windows (covered by the current window) may not be display on the screen for viewing.
In conventional graphics technology, rendering overlapped windows is managed by dividing the overlapped windows using a multiple-layer method. Multiple pipelines of a computer graphics engine are used to respectively render objects of different layers and display the overlapped portion of the layers using an alpha-blending method. This allows users to see partial contents of the other windows while operating the current window, so that users may switch and operate between different windows.
In order to present an effect of alpha-blending as described above, a background is firstly displayed on the screen by the computer. Then, a first window (i.e. the window at bottom) is rendered after data of background is read. In the rendering of the first window, an alpha-blending calculation is performed according to the alpha-blending parameters of the background and the first window. Then, a result of the alpha-blending calculation is written into a memory, such that a portion of the background may be seen through an alpha-blending portion of the first window. Accordingly, a second window is rendered by the computer after data of background and the first window are re-read. In the rendering of the second window, the alpha-blending calculation is performed according to the alpha-blending parameters of the first window and the second window. Then, a result of the alpha-blending calculation is written into a memory, such that a portion of the background and a portion of the first window may be seen through an alpha-blending portion of the second window. However, when the amount of opened windows is increase, the loading for the computer to perform the alpha-blending calculation may also be increased. Moreover, operations of repeatedly reading/writing memory may occupy too much memory, thereby affecting an overall performance of the computer.